package com.bc5Neptune.cis.android;

//import com.testlayout.R;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.provider.MediaStore.Images;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class ViewImgActivity extends Activity implements OnClickListener{
	EditText edtPID;
	AutoCompleteTextView actName;
	EditText edtDOB;
	AutoCompleteTextView actHTown;
	AutoCompleteTextView actRes;
	AutoCompleteTextView actChar;
	EditText edtEth;
	EditText edtRel;
	ImageView imgVReceive;
	Button btnOK;
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.receive_data);
    Bundle bdRecInf = this.getIntent().getExtras();
    String pid = bdRecInf.getString("1");
    edtPID = (EditText)findViewById(R.id.edtPID);
    edtPID.setText(pid);
    
    String name = bdRecInf.getString("2");
    actName = (AutoCompleteTextView)findViewById(R.id.actName);
    actName.setText(name);
    
    String dob = bdRecInf.getString("3");
    edtDOB = (EditText)findViewById(R.id.edtDOB);
    edtDOB.setText(dob);
    
    String htown = bdRecInf.getString("4");
    actHTown = (AutoCompleteTextView)findViewById(R.id.actHTown);
    actHTown.setText(htown);
    
    String res = bdRecInf.getString("5");
    actRes = (AutoCompleteTextView)findViewById(R.id.actRes);
    actRes.setText(res);
    
    String charac = bdRecInf.getString("6");
    actChar = (AutoCompleteTextView)findViewById(R.id.actChar);
    actChar.setText(charac);
    
    String eth = bdRecInf.getString("7");
    edtPID = (EditText)findViewById(R.id.edtEth);
    edtPID.setText(eth);
    
    String rel = bdRecInf.getString("8");
    edtPID = (EditText)findViewById(R.id.edtRel);
    edtPID.setText(rel);
    
    byte[] bImg = bdRecInf.getByteArray("9");
    imgVReceive = (ImageView)findViewById(R.id.imgVReceive);
    //imgVReceive.set
    Bitmap bitmap = BitmapFactory.decodeByteArray(bImg , 0, bImg .length);
    imgVReceive.setImageBitmap(bitmap);
    btnOK =(Button)findViewById(R.id.btnOK);
    btnOK.setOnClickListener(this);
}
public void onClick(View arg0) {
	// TODO Auto-generated method stub
	System.exit(0);
	
}
}
